#include <xp/bas/string.h>
#include <xp/bas/stdio.h>

int xp_main ()
{
	xp_char_t x[1000];
	xp_size_t n;

	xp_strcpy (x, XP_TEXT("this is very nice"));
	n = xp_strrmchr (x, XP_CHAR('i'));
	xp_printf (XP_TEXT("%d, [%s]\n"), n, x);

	xp_strcpy (x, XP_TEXT("this is very nice"));
	n = xp_strxrmchr (x, 3, XP_CHAR('t'));
	x[n] = XP_CHAR('\0');
	xp_printf (XP_TEXT("%d, [%s]\n"), n, x);

	return 0;
}

